package com.oocl.hw1.task3.pojo;

import java.util.Date;

public class Customer implements Comparable<Customer>, Cloneable{

	private int id;
	private String name;
	private String email;
	private boolean sex;
	private Date birthday;
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public boolean isSex() {
		return sex;
	}
	public void setSex(boolean sex) {
		this.sex = sex;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	@Override
	public int compareTo(Customer o) {
		return (this.id -o.id);
	}
	
	
	@Override
	public Object clone() throws CloneNotSupportedException {
		Object o = super.clone();
		Customer customer = (Customer)o;
		customer.birthday = (Date) this.birthday.clone();
		return o;
	}
	
}
